<?php
	// Liên kết - Phần nghiệp vụ
	class lienketbs
	{
		public $MaLienKet	= 0;
		public $TenLienKet	= "";
		public $DiaChi		= "";
		
		public function Them()
		{
			$db = new lienketdb();
			return $db->Them($this->TenLienKet, 
							 $this->DiaChi);
		}
		
		public function CapNhat()
		{
			$db = new lienketdb();
			return $db->CapNhat($this->MaLienKet, 
							    $this->TenLienKet, 
							    $this->DiaChi);
		}
		
		public function Xoa()
		{
			$db = new lienketdb();
			return $db->Xoa($this->MaLienKet);
		}
		
		public function XoaTatCa()
		{
			$db = new lienketdb();
			return $db->XoaTatCa();
		}
		
		public function LayDanhSach()
		{
			$db = new lienketdb();
			return $db->LayDanhSach($this->MaLienKet,
									$this->TenLienKet, 
							   		$this->DiaChi);
		}
	}
?>